import Logger from "../libs/sdk/echatim/log/Logger";


class ClassDefaultValue {
    valueNormal: string | undefined;
    valueOption?: string;

    constructor(valueNormal = "", valueOption?:string) {
        this.valueNormal = valueNormal;
        this.valueOption = valueOption;
    }

    public funny(valueNormal = "", valueOption:string|undefined = ""): void{
        this.valueOption = valueOption;
        return;
    }
}

describe('函数/类测试', () => {

    it('defaultValue', async () => {
        const obj = new ClassDefaultValue('hei');
        Logger.info(`obj: ${JSON.stringify(obj)}`);

        const obj2 = new ClassDefaultValue('hei2');
        obj2.funny("yes");
        Logger.info(`obj: ${JSON.stringify(obj2)}`);
        // set a special params
        const obj3 = new ClassDefaultValue('hei3');
        obj3.funny("yes3", "no");
        Logger.info(`obj: ${JSON.stringify(obj3)}`);
    });

});

